package fa.wangxing.leaf.Service.impl;

import fa.wangxing.leaf.Mapper.CartMapper;
import fa.wangxing.leaf.Service.Cartservice;
import fa.wangxing.leaf.pojo.Cart;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Cartserviceimpl implements Cartservice {
    @Resource
    private CartMapper cartMapper;

    public void  addtocart(int user_id,int dishes_id){
        cartMapper.addtocart(user_id,dishes_id);
    }
    public List<Cart> getcart(int user_id){
        return cartMapper.getcart(user_id);
    }
    public void deletebyId(int id){
        cartMapper.deletebyId(id);
    }

}
